﻿<%--

This file is part of Refix.

Refix is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.

Refix is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with Refix.  If not, see <http://www.gnu.org/licenses/>.

Copyright (C) 2010-11 David Musgrove and others.
 
--%><%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<SummaryEntry>>" %>
<%@ Import Namespace="Refix.Repository.ViewModels" %>
<%@ Import Namespace="System.Collections.Generic" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Refix Repository
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Refix Repository</h2>
    <%
        if (!string.IsNullOrEmpty(Refix.Core.Configuration.RemoteRepository))
        {
        %><p>Next level repository: <a href="<%= Refix.Core.Configuration.RemoteRepository %>"><%= Refix.Core.Configuration.RemoteRepository%></a></p><%
        }
        else
        {
        %><p>This is a top level repository.</p><%
        }
    %>
    <div id="summary">
        <table>
            <thead>
                <th>Component</th>
                <th>Versions</th>
                <th>Latest</th>
                <th>Local rev. #</th>
                <th>Remote rev. #</th>
                <th>Options</th>
            </thead>
            <tbody>
    <%
    
        foreach (var entry in Model)
        {
            %><tr>
            <td><%= entry.Component %></td>
            <td><%= entry.VersionCount %></td>
            <td><%= entry.MaximumVersion %></td>
            <td><%= entry.LocalRevision %></td>
            <td><%= entry.RemoteRevision %></td>
            <td><a href="#" class="sync" title="Synchronise with next level repository"> </a></td>
            </tr>
            <%
        }
    
    %>
            </tbody>
        </table>
    </div>

</asp:Content>
